package com.qf.common.feigns;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@FeignClient(value = "qf-center-service")
public interface DeviceTopicApi {

    @GetMapping("/api/deviceTopic/topics")
    List<String> findAllTopics();

    /**
     * 根据设备key查询该设备上报数据的主题
     * @param deviceKey
     * @return
     */
    @GetMapping("/api/deviceTopic/topics/{deviceKey}")
    List<String> findTopicByDeviceKey(@PathVariable("deviceKey") String deviceKey);
}
